﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;

namespace IFRS.DataAccess.DAL
{
    public class SPR_TMP_INP_KEY_RATE
    {
        public DataTable SELECTBY_SESSION_ID(int sessionId, ref int recordCount, ref int errorCount)
        {
            DataTable dt;
            var utility = new IFRS_Utility();
            var lstParams = new List<SqlParameter>();
            try
            {
                lstParams.Add(new SqlParameter("@RecordCount", SqlDbType.Int));
                lstParams[0].Direction = ParameterDirection.Output;

                lstParams.Add(new SqlParameter("@ErrorCount", SqlDbType.Int));
                lstParams[1].Direction = ParameterDirection.Output;

                lstParams.Add(new SqlParameter("@SESSION_ID", sessionId));
                dt = utility.StoredProcDataTable("SPR_TMP_INP_KEY_RATE_SELECTBY_SESSION_ID", lstParams.ToArray());
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return dt;
        }
    }
}
